package io.renren.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.Data;

/**
 * 生成文档的列实体
 *
 * @author huangjiang <huangjiang1026@gmail.com>
 * @date 2020-02-26 14:09
 */
@Data
public class DocColumnEntity {
    /**
     * 列名
     */
    @ColumnWidth(20)
    @ExcelProperty(value = "名称", index = 0)
    private String columnName;
    /**
     * 列数据类型
     */
    @ColumnWidth(15)
    @ExcelProperty(value = "类型", index = 1)
    private String dataType;
    /**
     * 字段补充 auto_increment
     */
    @ExcelIgnore
    private String extra;
    /**
     * 列长度
     */
    @ColumnWidth(10)
    @ExcelProperty(value = "长度", index = 2)
    private String columnLength;
    /**
     * 列数字精度
     */
    @ExcelIgnore
    private Long numericPrecision;
    /**
     * 列小数点位数
     */
    @ExcelIgnore
    private Long numericScale;
    /**
     * 列主键
     */
    @ColumnWidth(10)
    @ExcelProperty(value = "主键", index = 5)
    private String columnKey;
    /**
     * 列是否允许空
     */
    @ColumnWidth(10)
    @ExcelProperty(value = "可空", index = 3)
    private String columnNullable;
    /**
     * 列默认值
     */
    @ColumnWidth(15)
    @ExcelProperty(value = "默认值", index = 6)
    private String columnDefault;
    /**
     * 列备注
     */
    @ColumnWidth(50)
    @ExcelProperty(value = "注释", index = 4)
    private String columnComment;
}
